﻿<navigation:Page x:Class="QDP.Platform.Admin.Views.Imports" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    Title="专题展示系统-后台管理" 
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation">
    <Grid x:Name="LayoutRoot" DataContext="{StaticResource ViewModel}">
        <ListBox ItemsSource="{Binding Path=Files}">
            <ListBox.ItemContainerStyle>
                <Style TargetType="ListBoxItem">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Grid Margin="2,1">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="150" />
                                        <ColumnDefinition Width="5" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="30" />
                                    </Grid.ColumnDefinitions>
                                    <ComboBox Height="24" SelectedIndex="{Binding Mode,Mode=TwoWay}">
                                        <ComboBoxItem Content="ZipAssembly" ToolTipService.ToolTip="通过zip压缩过的程序集，该模式文件加载后直接解压。" />
                                        <ComboBoxItem Content="DllAssembly" ToolTipService.ToolTip="常规DLL程序集，该模式文件仅加载即可。"/>
                                        <ComboBoxItem Content="ZipTheme" ToolTipService.ToolTip="" />
                                        <ComboBoxItem Content="XamlTheme"  ToolTipService.ToolTip="xaml文件主题，该模式文件加载后将内部样式导入平台。"/>
                                        <ComboBoxItem Content="ThemeAssembly" ToolTipService.ToolTip="程序集形式主题，该模式文件加载后将主题（Theme派生类）应用到平台。" />
                                    </ComboBox>
                                    <TextBox Grid.Column="2" Text="{Binding Url,Mode=TwoWay}"/>
                                    <Button x:Name="delete" Content="Delete" Margin="4,0" Grid.Column="3"
                                            HorizontalAlignment="Center" VerticalAlignment="Center"
                                            Command="{Binding DeleteUrlCommand, Mode=OneWay, Source={StaticResource ViewModel}}"
                                            CommandParameter="{Binding Mode=OneWay}"
                                            Style="{StaticResource Delete-Button}" Width="15"/>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </ListBox.ItemContainerStyle>
        </ListBox>
    </Grid>
</navigation:Page>
